<template>
	<view class="content">
		<view class="swiper">
			<view class="swiper-con">
				<uv-swiper :list="list3" indicator indicatorMode="line" circular height="195" radius="8"></uv-swiper>
			</view>
		</view>

		<view class="img-list" style="margin-top: 50rpx;">
			<view class="img-list-l" hover-class="activeM">
				<image src="/static/images/baomingtongdao.png" mode="widthFix"></image>
			</view>
			<view class="img-list-r">
				<view class="img-list-r-t" hover-class="activeM" @click="goTp">
					<image src="/static/images/toupiaotongdao.png" mode="widthFix"></image>
				</view>
				<view class="img-list-r-b" hover-class="activeM" @click="report">
					<image src="/static/images/jubaotongdao.png" mode="widthFix"></image>
				</view>
			</view>
		</view>

		<view class="remen">
			<view class="remen-text1">
				热 门 作 品
			</view>
			<view class="remen-text2">
				前往更多 <uv-icon name='arrow-right' size='12' color='##9095A8'></uv-icon>
			</view>

			<view class="imagebox">
				<SwiperStack :list="imageList" :width="520" :height="690" />
			</view>

			<view class="message-box">
				<view class="message-box-l">
					<image src="/static/images/quequanquanbu.png" mode="widthFix"></image>
				</view>
				<view class="message-box-r">
					<view class="message-box-r1">
						<view class="message-box-r1-text1">
							懒人工作室
						</view>
						<view class="message-box-r1-text2">
							潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师IP设计师潮玩、IP设计师
						</view>
					</view>
					<view class="message-box-r1" style="margin-top: 40rpx;">
						<view class="message-box-r1-text1">
							原创潮玩ip丨万圣节系列
						</view>
						<view class="message-box-r1-text2">
							潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师潮玩、IP设计师IP设计师潮玩、IP设计师
						</view>
					</view>
				</view>
			</view>
		</view>

		<view class="remen">
			<view class="remen-text1">
				新 品 速 递
			</view>
			<view class="remen-text2">
				前往更多 <uv-icon name='arrow-right' size='12' color='##9095A8'></uv-icon>
			</view>

			<view class="swiperbox">
				<uv-swiper style="background-color: #fff;" :list="list3" nextMargin="50" previousMargin="50"
					:indicator="false" circular height="260" radius="8" bgColor="#fff"></uv-swiper>

				<view class="swiper-b">
					<image src="/static/images/ceshitupian.png" mode="widthFix"></image>
					<image src="/static/images/ceshitupian.png" mode="widthFix"></image>
					<image src="/static/images/ceshitupian.png" mode="widthFix"></image>
				</view>
			</view>
		</view>

		<view class="remen">
			<view class="remen-text1">
				资 讯
			</view>
			<view class="remen-text2">
				前往更多 <uv-icon name='arrow-right' size='12' color='##9095A8'></uv-icon>
			</view>

			<view class="shop-box">
				<Waterfall :list="goodsList" :columnCount="2" :gap="10">
					<template #default="{ item }">
						<view class="shop-box-item">
							<view class="img">
								<image :src="item.image" mode="widthFix"></image>
							</view>

							<view class="text1">
								泡泡玛特 X 壹橙视觉 labubu和周边泡泡玛特 X 壹橙视觉 labubu和周边
							</view>

							<view class="text2">
								<view class="text2-l">
									<view class="avatar">
										<image src="/static/images/quequanquanbu.png" mode="widthFix"></image>
									</view>

									<view class="nickname">
										布果chacoco布果chacoco
									</view>

								</view>
								<view class="text2-r">
									<!-- <uv-icon name="heart" color="#828999" size="24"></uv-icon> -->
									<!-- 点击收藏 -->
									<uv-icon name="heart-fill" color="#fa2800" size="18"></uv-icon>
									12
								</view>
							</view>
						</view>
					</template>
				</Waterfall>


			</view>
		</view>
	</view>
</template>

<script setup>
	import SwiperStack from '@/components/SwiperStack.vue'
	import Waterfall from '@/components/Waterfall.vue'
	import {
		ref,
		reactive
	} from 'vue'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	import {
		baseUrl,
		http
	} from '@/utils/request'
	import emitter from '@/utils/emitter.js'
	import {
		showMsg
	} from '@/utils/showMsg'

	const list3 = ref([
		'https://picsum.photos/id/1011/600/800', 'https://picsum.photos/id/1012/600/800',
		'https://picsum.photos/id/1013/600/800'
	])

	const imageList = [{
			id: 1,
			image: 'https://picsum.photos/id/1011/600/800'
		},
		{
			id: 2,
			image: 'https://picsum.photos/id/1012/600/800'
		},
		{
			id: 3,
			image: 'https://picsum.photos/id/1013/600/800'
		},
		{
			id: 4,
			image: 'https://picsum.photos/id/1014/600/800'
		}, {
			id: 5,
			image: 'https://picsum.photos/id/1015/600/800'
		}, {
			id: 6,
			image: 'https://picsum.photos/id/1016/600/800'
		},
	]

	const goodsList = ref([{
			image: 'https://picsum.photos/id/1011/200/300',
		},
		{
			image: 'https://picsum.photos/id/1012/200/400',
		},
		{
			image: 'https://picsum.photos/id/1013/200/500',
		},
		{
			image: 'https://picsum.photos/id/1014/200/350',
		},
		{
			image: 'https://picsum.photos/id/1015/200/450',
		},
		{
			image: 'https://picsum.photos/id/1016/200/600',
		},
	])

	const goTp = () => {
		uni.navigateTo({
			url: '/subpackages/home/vote'
		})
	}
	
	const report = () => {
		uni.navigateTo({
			url: '/pages/report/report'
		})
	}
</script>

<style lang="scss" scoped>
	.swiper {
		width: 100%;
		padding: 0rpx 30rpx;

		.swiper-con {
			width: 100%;
			height: 390rpx;
		}
	}

	.img-list {
		width: 100%;
		padding: 0rpx 30rpx;
		margin-top: 20rpx;
		display: flex;

		.img-list-l {
			width: 50%;
			height: 300rpx;

			image {
				width: 100% !important;
				height: 300rpx !important;
			}
		}

		.img-list-r {
			width: 50%;

			.img-list-r-t {
				width: 100%;

				image {
					width: 100% !important;
					height: 190rpx !important;
				}
			}

			.img-list-r-b {
				width: 100%;
				padding-left: 18rpx;
				margin-top: 10rpx;

				image {
					width: 100% !important;
					height: 98rpx !important;
				}
			}
		}
	}

	.remen {
		width: 100%;
		margin-top: 80rpx;
		padding: 0rpx 30rpx;

		.remen-text1 {
			width: 100%;
			text-align: center;
			font-weight: bold;
			font-size: 32rpx;
			color: #000000;
		}

		.remen-text2 {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-weight: 400;
			font-size: 26rpx;
			color: #9095A8;
			margin-top: 20rpx;
		}

		.message-box {
			width: 100%;
			margin-top: 30rpx;
			display: flex;

			.message-box-l {
				width: 100rpx;
				height: 100rpx;
				border-radius: 50rpx;

				image {
					width: 100rpx !important;
					height: 100rpx !important;
					border-radius: 50rpx !important;
				}
			}

			.message-box-r {
				width: calc(100% - 100rpx);
				padding-left: 30rpx;

				.message-box-r1 {
					width: 100%;

					.message-box-r1-text1 {
						width: 100%;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						font-weight: 600;
						font-size: 30rpx;
						color: #000000;
					}

					.message-box-r1-text2 {
						width: 100%;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						-webkit-line-clamp: 2;
						font-weight: 400;
						font-size: 28rpx;
						color: #9095A8;
						margin-top: 10rpx;
					}
				}
			}
		}

		.swiperbox {
			width: 100%;
			margin-top: 40rpx;

			.swiper-b {
				width: 100%;
				margin-top: 20rpx;
				display: flex;
				justify-content: center;
				gap: 22rpx;

				image {
					width: 172rpx !important;
					height: 204rpx !important;
					border-radius: 16rpx !important;
				}
			}
		}

		.shop-box {
			width: 100%;
			margin-top: 30rpx;

			.shop-box-item {
				box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
				padding-bottom: 10rpx;
				border-radius: 0rpx 0rpx 8rpx 8rpx;

				.img {
					position: relative;
					width: 100%;

					image {
						width: 100% !important;
						// height: 400rpx !important;
						border-radius: 8rpx 8rpx 8rpx 8rpx !important;
					}
				}


				.text1 {
					width: 100%;
					margin: 20rpx 0rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 2;
					font-weight: 600;
					font-size: 30rpx;
					color: #000000;
					padding: 0rpx 10rpx;
				}

				.text2 {
					width: 100%;
					display: flex;
					padding: 0rpx 10rpx;

					.text2-l {
						width: 60%;
						display: flex;
						align-items: center;
						gap: 10rpx;

						.avatar {
							width: 36rpx;
							height: 36rpx;

							image {
								width: 36rpx !important;
								height: 36rpx !important;
								border-radius: 50% !important;
							}
						}

						.nickname {
							width: calc(100% - 36rpx);
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							font-weight: 400;
							font-size: 24rpx;
							color: #9095A8;
						}
					}

					.text2-r {
						width: 40%;
						display: flex;
						align-items: center;
						justify-content: flex-end;
						gap: 10rpx;
						font-weight: 400;
						font-size: 24rpx;
						color: #9095A8;
					}
				}
			}
		}
	}
</style>